//
//  UIView+NEDBadge.h
//  MoreCoin
//
//  Created by 林宁宁 on 2019/9/23.
//  Copyright © 2019 MoreCoin. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, NEDBadgeCountPosition) {
    NEDBadgeCountPosition_RightTop,// 右上 居中
    NEDBadgeCountPosition_RightCenter,//右侧 居中
    NEDBadgeCountPosition_RightBottom,//右侧 下边
    NEDBadgeCountPosition_TopCenter,//顶部
    NEDBadgeCountPosition_LeftTop,
    NEDBadgeCountPosition_LeftCenter,
    NEDBadgeCountPosition_LeftBottom,
};

@class NEDBadgeCountView;
@interface UIView (NEDBadge)

/// 角标数
@property (retain, nonatomic) NEDBadgeCountView * badgeCountView;

@end

/** 角标视图
 默认
 中心点 x 跟父视图右边对齐
 中心点 y 跟父视图上边对齐
 */
@interface NEDBadgeCountView : UIButton

@property (retain, nonatomic) UIColor * badgeBackgroundColor;

/// 需要对其的视图 针对该视图对齐
@property (weak, nonatomic) UIView * centerOffetView;
/// 相对的中心点偏移视图 x 正右 负左  y 正下 负上
@property (assign, nonatomic) CGPoint centerOffet;

@property (assign, nonatomic) NEDBadgeCountPosition position;

// 11
@property (assign, nonatomic) CGFloat badgeHeight;

@property (copy, nonatomic) NSString * _Nullable badgeCount; //角标数

@property (assign, nonatomic) BOOL isPointShow; //显示小红点
/// 6
@property (assign, nonatomic) CGFloat pointSize;

/// 角标数为0 也显示 ： no
@property (assign, nonatomic) BOOL isShowZero;
/// 圆角类型 默认All
@property (assign, nonatomic) UIRectCorner cornerPosType;

/// left 3 right 3
@property (assign, nonatomic) UIEdgeInsets contentInset;

@end



NS_ASSUME_NONNULL_END
